package com.guxuede.mina.bean;

import java.util.HashMap;

import org.apache.mina.core.buffer.IoBuffer;

public class HttpMessage {
	
	public String head;
	public String uri;
	public HashMap<String,String> data;
	
	public IoBuffer body;
	
	
	private static final String defaulthead="HTTP/1.1 200 OK\r\nContent-Type: text/html\r\n\r\n";
	
	@Override
	public String toString() {
		return "head:"+head+" uri:"+uri+" data:"+data;
	}
	
	/*
	 * 自动组装一些默认的头部。
	 */
	public static HttpMessage getDefaultResponse(){
		HttpMessage response=new HttpMessage();
		response.head=defaulthead;
		return response;
	}
	
}
